package com.funcourse.demo.aliyun.contentsafe.io;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * https://help.aliyun.com/document_detail/70292.html?spm=a2c4g.11186623.2.45.69d86eafBNeNdU#reference-fzy-ztm-v2b
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class ContentCheckResponseBody {
  Integer code;
  String msg;
  String requestId;
  List<DataContent> data;

  @AllArgsConstructor
  @JsonIgnoreProperties(ignoreUnknown = true)
  @NoArgsConstructor
  @Data
  public static class DataContent{
    Integer code;
    String msg;
    String taskId;
    String content;
    String url;
    List<Result> results;
  }

  @Data
  @JsonIgnoreProperties(ignoreUnknown = true)
  public static class Result{
    CheckScene scene;
    String label;
    String sublabel;
    Suggestion suggestion;
    Double rate;
  }

  public  enum Suggestion{
    pass,review,block
  }
  public enum Label{
    normal,
    porn,sexy,
    bloody,explosion,outfit,logo,weapon,politics,violence,crowd,parade,carcrash,flag,location,others
  }
}
